I recently learned how to develop agile Web applications-applying rails for agile web development, version 2nd. When I implemented depot in chapter 1
Create the "goods maintenance" application,
Class admincontroller Scaffold: Product
End
Then
Depot> Ruby script/Server
An error occurs when I enter localhost: 3000/admin in the browser:
Undefined method 'scaffold
1. Visit the official website of the Rails i18n plugin to view the informationHttp://guides.rubyonrails.org/i18n.html2. Add the test to Gemfile rails4.2.1 do not install this gemGem ' rails-i18n '3. Install by using bundle install4. Configure CONFIG/APPLICATION.RB[Ruby] View plaincopy1. # CONFIG/APPLICATION.RB2. Config.i18n.load_path + = dir[rails.root.join (' config ', ' locales ', ' * * ', ' *.{ RB,YML} '
Scaffolding is a very easy way to rails, some simple additions and deletions to check the scaffolding can be achieved, save us unnecessary trouble, so how to use rails scaffolding, today to explain.
. Specify port Start Rails project
Copy Code code as follows:
Ruby Script/server Webrick-p 3000
0. Create a project
Copy Code code as follow
Scaffolding is a very easy method for rails. Some simple addition, deletion, modification, and query scaffolding can be implemented, saving unnecessary trouble. How can we use rails scaffolding? Let's explain it today.
. Specify the port to start the rails ProjectCopy codeThe Code is as follows: ruby script/server webrick-p 30000. Create a projectCopy codeThe Cod
The improved Ruby development environment in NetBeans 6.1
The NetBeans 6.1 Chinese version, released early this month, offers a number of new and extended features such as high-performance, JavaScript Editor extensions, Spring framework unification, and Easy-to-use MySQL support. For more information about new and extended features of NetBeans 6.1, see the following:
NetBeans IDE 6.1 Information: http://www.netbeans.org/community/releases/61/index_zh_CN.html
You can download the relevant soft
With the page cache, Rails can no longer intervene. In a way, that's a good thing, because you can really get good performance. Rails simply creates an HTML page, puts it in a directory, and after that, it can be placed behind your head. From then on, the application server manages the pages and the pages go into the application server without any loops. From a performance perspective, page caching is a god
, let's create the controller first.
The command line is as follows: Ruby script/generate Controller Hello
This produces a controller that corresponds to the c:/rubydev/first/app/controllers hello_controller.rb
Create an action, which is to modify the contents of the C:/rubydev/first/app/controllers hello_controller.rb file as follows:
Class Hellocontroller def thereEndEnd
Step Seventh: Write the there.rhtml below the/app/views/hello directory, which reads as follows:
This is your the on
In the previous Ruby on Rails development from scratch (Windows) (iii)-Implementation of the jump between pages, we created two pages for the jump migration, this time we write a single form of maintenance of the TIM Delete Check the example.
1. This time we recreate a project depot, and follow the steps in the previous article to create a depot project.
2. Create a database.
You can use the
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.